package com.cj.cms.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.cj.common.entity.IdEntity;
import com.cj.sys.entity.security.User;

@Entity
@Table(name = "ARTICLE")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE,region="Article")
public class Article extends IdEntity{
	public Article() {
	}
	public Article(Long id) {
		super.setId(id);
	}
	
	private String title;
	/**
	 * 副标题
	 */
	private String shortTitle;
	/**
	 * 作者--非录入人员
	 */
	private String author;
	private String content;
    private Date createTime;
    private Date modifyTime;
	private User createUser;
	private User modifyUser;
	private String imgUrl;
	private Channel channel;
	private String fullName;
	/**
	 * 置顶时间
	 */
	private Date topTime;
	private Integer isTop;
	private Integer orderNum;
	//SEO优化
	private String keywords;
	private String description;
	
	private String defStr0;
	private String defStr1;
	private String defStr2;
	private String defStr3;
	private String defStr4;
	private String defStr5;
	private String defStr6;
	private String defStr7;
	private String defStr8;
	private String defStr9;
	private Integer defInt0;
	private Integer defInt1;
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getShortTitle() {
		return shortTitle;
	}
	public void setShortTitle(String shortTitle) {
		this.shortTitle = shortTitle;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getModifyTime() {
		return modifyTime;
	}
	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "CREATE_USER")
	public User getCreateUser() {
		return createUser;
	}
	public void setCreateUser(User createUser) {
		this.createUser = createUser;
	}
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "MODIFY_USER")
	public User getModifyUser() {
		return modifyUser;
	}
	public void setModifyUser(User modifyUser) {
		this.modifyUser = modifyUser;
	}
	public String getImgUrl() {
		return imgUrl;
	}
	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}
	public Date getTopTime() {
		return topTime;
	}
	public void setTopTime(Date topTime) {
		this.topTime = topTime;
	}
	public Integer getIsTop() {
		return isTop;
	}
	public void setIsTop(Integer isTop) {
		this.isTop = isTop;
	}
	public Integer getOrderNum() {
		return orderNum;
	}
	public void setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
	}
	public String getKeywords() {
		return keywords;
	}
	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	public String getFullName() {
		return fullName;
	}
	public void setFullName(String fullName) {
		this.fullName = fullName;
	}
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "CHANNEL")
	public Channel getChannel() {
		return channel;
	}
	public void setChannel(Channel channel) {
		this.channel = channel;
	}
	public String getDefStr0() {
		return defStr0;
	}
	public void setDefStr0(String defStr0) {
		this.defStr0 = defStr0;
	}
	public String getDefStr1() {
		return defStr1;
	}
	public void setDefStr1(String defStr1) {
		this.defStr1 = defStr1;
	}
	public String getDefStr2() {
		return defStr2;
	}
	public void setDefStr2(String defStr2) {
		this.defStr2 = defStr2;
	}
	public String getDefStr3() {
		return defStr3;
	}
	public void setDefStr3(String defStr3) {
		this.defStr3 = defStr3;
	}
	public String getDefStr4() {
		return defStr4;
	}
	public void setDefStr4(String defStr4) {
		this.defStr4 = defStr4;
	}
	public String getDefStr5() {
		return defStr5;
	}
	public void setDefStr5(String defStr5) {
		this.defStr5 = defStr5;
	}
	public String getDefStr6() {
		return defStr6;
	}
	public void setDefStr6(String defStr6) {
		this.defStr6 = defStr6;
	}
	public String getDefStr7() {
		return defStr7;
	}
	public void setDefStr7(String defStr7) {
		this.defStr7 = defStr7;
	}
	public String getDefStr8() {
		return defStr8;
	}
	public void setDefStr8(String defStr8) {
		this.defStr8 = defStr8;
	}
	public String getDefStr9() {
		return defStr9;
	}
	public void setDefStr9(String defStr9) {
		this.defStr9 = defStr9;
	}
	public Integer getDefInt0() {
		return defInt0;
	}
	public void setDefInt0(Integer defInt0) {
		this.defInt0 = defInt0;
	}
	public Integer getDefInt1() {
		return defInt1;
	}
	public void setDefInt1(Integer defInt1) {
		this.defInt1 = defInt1;
	}
	
}
